#pragma once
//#include <boost/thread.hpp>
#include <boost/thread/thread.hpp>
#include "boost/date_time/posix_time/posix_time.hpp"

class myThread
{
public:
	myThread(void);
	myThread &operator=( myThread &thread);
	myThread(myThread& thread);
	~myThread(void);
	void start(void);
	void join(void);
	void detach(void);
	virtual void work(void)=0;
	
	enum Stat{PENDING,STARTED,INTERRUPTED,FINISHED};
	int getStatus(void);
	void setStatus(Stat status);
	void sleep(int time);
	boost::thread    m_Thread;
private:
	
	Stat status;
	 
	void workingBob();
};

